The present invention relates to data storage systems, and more particularly, this invention relates to preventing data overwrite during error recovery.
During write operations to a physical or virtual tape volume, errors may occur that require repositioning a write head to a prior position on the tape volume. As a result of the repositioning, the write head may be positioned over previously written data, such as at the beginning of the tape volume. Under some circumstances, the write head may resume writing operations to the tape volume while still positioned over the previously written data, resulting in an overwrite of the previously written data. Unfortunately, the data may be lost as a result of the overwriting.
Depending on the circumstances of the overwrite, and the type of the tape volume, recovery of the data may be possible. However, in other circumstances the overwrite will result an actual loss of the data. This may be especially true in a disk-only virtual tape environment, because any write attempt at the beginning of the volume will cause a disk file representing the tape volume to be truncated. In such situations, any ability to recover the overwritten data may then depend on other backups that exist, such as on other disks and/or tapes. Even when other backups do exist, recovering lost data often consumes a significant amount of time and effort.